﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InformationRetrieval.Wildcard
{
    /// <summary>
    /// Defines methods that are available on any wildcard query index
    /// </summary>
    public interface IWildcardIndex
    {
        /// <summary>
        /// Adds a term to the index.
        /// </summary>
        /// <param name="term">The term to be added</param>
        void AddTerm(string term);

        /// <summary>
        /// Adds each term in the sequence to the index.
        /// </summary>
        /// <param name="terms">A sequence of terms</param>
        void AddTerms(IEnumerable<string> terms);

        /// <summary>
        /// Finds all terms in the index that match the query.
        /// </summary>
        /// <param name="query">Query string</param>
        /// <returns>A sequence of terms that match the query</returns>
        IEnumerable<string> Find(string query);
    }
}
